function Account(params){ 
	 
}

Account.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new Account.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new Account.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new Account.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	
	
	/** 编号 [非空]       **/
	this.id=function(id){if(this.proxy)return this.getProxy().id(id);  this.put("id", id);return this;};
	/** and id is null */
	this.idNull=function(){if(this.proxy)return this.getProxy().idNull();if(this.get("idNot")==null)this.put("idNot", "");this.put("id", null);return this;};
	/** not .... */
	this.idNot=function(){if(this.proxy)return this.getProxy().idNot();this.put("idNot", "not");return this;};
	this.idNotNull=function(){if(this.proxy)return this.getProxy().idNotNull();this.put("idNot", "not");this.put("id", null);return this;};
	this.idNot=function(id){if(this.proxy)return this.getProxy().idNot(id);this.put("idNot", "not");this.put("id", id);return this;};
		
	/** and id <= ? */
	this.idMin=function(min){if(this.proxy)return this.getProxy().idMin(min);this.put("idMin", min);return this;};
	/** and id >= ? */
	this.idMax=function(max){if(this.proxy)return this.getProxy().idMax(max);this.put("idMax", max);return this;};
		
		
	this.idIn=function(ids){
		if(this.proxy)return this.getProxy().idIn(ids);  this.put("idIn", ids);return this;
	};	
		 
	
	
	/** 所属会员 [非空] [Member]      **/
	this.member=function(member){if(this.proxy)return this.getProxy().member(member);  this.put("member", member);return this;};
	/** and member is null */
	this.memberNull=function(){if(this.proxy)return this.getProxy().memberNull();if(this.get("memberNot")==null)this.put("memberNot", "");this.put("member", null);return this;};
	/** not .... */
	this.memberNot=function(){if(this.proxy)return this.getProxy().memberNot();this.put("memberNot", "not");return this;};
	this.memberNotNull=function(){if(this.proxy)return this.getProxy().memberNotNull();this.put("memberNot", "not");this.put("member", null);return this;};
	this.memberNot=function(member){if(this.proxy)return this.getProxy().memberNot(member);this.put("memberNot", "not");this.put("member", member);return this;};
		
		
	this.memberIn=function(ids){
		if(this.proxy)return this.getProxy().memberIn(ids);  this.put("memberIn", ids);return this;
	};	
		 
	
	
	/** 会员信息        **/
	this.nickName=function(nickName){if(this.proxy)return this.getProxy().nickName(nickName);  this.put("nickName", nickName);return this;};
	/** and nick_name is null */
	this.nickNameNull=function(){if(this.proxy)return this.getProxy().nickNameNull();if(this.get("nickNameNot")==null)this.put("nickNameNot", "");this.put("nickName", null);return this;};
	/** not .... */
	this.nickNameNot=function(){if(this.proxy)return this.getProxy().nickNameNot();this.put("nickNameNot", "not");return this;};
	this.nickNameNotNull=function(){if(this.proxy)return this.getProxy().nickNameNotNull();this.put("nickNameNot", "not");this.put("nickName", null);return this;};
	this.nickNameNot=function(nickName){if(this.proxy)return this.getProxy().nickNameNot(nickName);this.put("nickNameNot", "not");this.put("nickName", nickName);return this;};
		
		 
	
	
	/** 联系人姓名        **/
	this.nameContact=function(nameContact){if(this.proxy)return this.getProxy().nameContact(nameContact);  this.put("nameContact", nameContact);return this;};
	/** and name_contact is null */
	this.nameContactNull=function(){if(this.proxy)return this.getProxy().nameContactNull();if(this.get("nameContactNot")==null)this.put("nameContactNot", "");this.put("nameContact", null);return this;};
	/** not .... */
	this.nameContactNot=function(){if(this.proxy)return this.getProxy().nameContactNot();this.put("nameContactNot", "not");return this;};
	this.nameContactNotNull=function(){if(this.proxy)return this.getProxy().nameContactNotNull();this.put("nameContactNot", "not");this.put("nameContact", null);return this;};
	this.nameContactNot=function(nameContact){if(this.proxy)return this.getProxy().nameContactNot(nameContact);this.put("nameContactNot", "not");this.put("nameContact", nameContact);return this;};
		
		 
	
	
	/** 联系电话        **/
	this.contactNumber=function(contactNumber){if(this.proxy)return this.getProxy().contactNumber(contactNumber);  this.put("contactNumber", contactNumber);return this;};
	/** and contact_number is null */
	this.contactNumberNull=function(){if(this.proxy)return this.getProxy().contactNumberNull();if(this.get("contactNumberNot")==null)this.put("contactNumberNot", "");this.put("contactNumber", null);return this;};
	/** not .... */
	this.contactNumberNot=function(){if(this.proxy)return this.getProxy().contactNumberNot();this.put("contactNumberNot", "not");return this;};
	this.contactNumberNotNull=function(){if(this.proxy)return this.getProxy().contactNumberNotNull();this.put("contactNumberNot", "not");this.put("contactNumber", null);return this;};
	this.contactNumberNot=function(contactNumber){if(this.proxy)return this.getProxy().contactNumberNot(contactNumber);this.put("contactNumberNot", "not");this.put("contactNumber", contactNumber);return this;};
		
		 
	
	
	/** 支付宝姓名        **/
	this.alipayName=function(alipayName){if(this.proxy)return this.getProxy().alipayName(alipayName);  this.put("alipayName", alipayName);return this;};
	/** and alipay_name is null */
	this.alipayNameNull=function(){if(this.proxy)return this.getProxy().alipayNameNull();if(this.get("alipayNameNot")==null)this.put("alipayNameNot", "");this.put("alipayName", null);return this;};
	/** not .... */
	this.alipayNameNot=function(){if(this.proxy)return this.getProxy().alipayNameNot();this.put("alipayNameNot", "not");return this;};
	this.alipayNameNotNull=function(){if(this.proxy)return this.getProxy().alipayNameNotNull();this.put("alipayNameNot", "not");this.put("alipayName", null);return this;};
	this.alipayNameNot=function(alipayName){if(this.proxy)return this.getProxy().alipayNameNot(alipayName);this.put("alipayNameNot", "not");this.put("alipayName", alipayName);return this;};
		
		 
	
	
	/** 支付宝账号        **/
	this.alipayNo=function(alipayNo){if(this.proxy)return this.getProxy().alipayNo(alipayNo);  this.put("alipayNo", alipayNo);return this;};
	/** and alipay_no is null */
	this.alipayNoNull=function(){if(this.proxy)return this.getProxy().alipayNoNull();if(this.get("alipayNoNot")==null)this.put("alipayNoNot", "");this.put("alipayNo", null);return this;};
	/** not .... */
	this.alipayNoNot=function(){if(this.proxy)return this.getProxy().alipayNoNot();this.put("alipayNoNot", "not");return this;};
	this.alipayNoNotNull=function(){if(this.proxy)return this.getProxy().alipayNoNotNull();this.put("alipayNoNot", "not");this.put("alipayNo", null);return this;};
	this.alipayNoNot=function(alipayNo){if(this.proxy)return this.getProxy().alipayNoNot(alipayNo);this.put("alipayNoNot", "not");this.put("alipayNo", alipayNo);return this;};
		
		 
	
	
	/** 余额 [非空]       **/
	this.money=function(money){if(this.proxy)return this.getProxy().money(money);  this.put("money", money);return this;};
	/** and money is null */
	this.moneyNull=function(){if(this.proxy)return this.getProxy().moneyNull();if(this.get("moneyNot")==null)this.put("moneyNot", "");this.put("money", null);return this;};
	/** not .... */
	this.moneyNot=function(){if(this.proxy)return this.getProxy().moneyNot();this.put("moneyNot", "not");return this;};
	this.moneyNotNull=function(){if(this.proxy)return this.getProxy().moneyNotNull();this.put("moneyNot", "not");this.put("money", null);return this;};
	this.moneyNot=function(money){if(this.proxy)return this.getProxy().moneyNot(money);this.put("moneyNot", "not");this.put("money", money);return this;};
		
	/** and money <= ? */
	this.moneyMin=function(min){if(this.proxy)return this.getProxy().moneyMin(min);this.put("moneyMin", min);return this;};
	/** and money >= ? */
	this.moneyMax=function(max){if(this.proxy)return this.getProxy().moneyMax(max);this.put("moneyMax", max);return this;};
		
		 
	
	
	/** 累计提现        **/
	this.lTmoney=function(lTmoney){if(this.proxy)return this.getProxy().lTmoney(lTmoney);  this.put("lTmoney", lTmoney);return this;};
	/** and l_tmoney is null */
	this.lTmoneyNull=function(){if(this.proxy)return this.getProxy().lTmoneyNull();if(this.get("lTmoneyNot")==null)this.put("lTmoneyNot", "");this.put("lTmoney", null);return this;};
	/** not .... */
	this.lTmoneyNot=function(){if(this.proxy)return this.getProxy().lTmoneyNot();this.put("lTmoneyNot", "not");return this;};
	this.lTmoneyNotNull=function(){if(this.proxy)return this.getProxy().lTmoneyNotNull();this.put("lTmoneyNot", "not");this.put("lTmoney", null);return this;};
	this.lTmoneyNot=function(lTmoney){if(this.proxy)return this.getProxy().lTmoneyNot(lTmoney);this.put("lTmoneyNot", "not");this.put("lTmoney", lTmoney);return this;};
		
	/** and l_tmoney <= ? */
	this.lTmoneyMin=function(min){if(this.proxy)return this.getProxy().lTmoneyMin(min);this.put("lTmoneyMin", min);return this;};
	/** and l_tmoney >= ? */
	this.lTmoneyMax=function(max){if(this.proxy)return this.getProxy().lTmoneyMax(max);this.put("lTmoneyMax", max);return this;};
		
		 
	
	
	/** 累计收益        **/
	this.lSmoney=function(lSmoney){if(this.proxy)return this.getProxy().lSmoney(lSmoney);  this.put("lSmoney", lSmoney);return this;};
	/** and l_smoney is null */
	this.lSmoneyNull=function(){if(this.proxy)return this.getProxy().lSmoneyNull();if(this.get("lSmoneyNot")==null)this.put("lSmoneyNot", "");this.put("lSmoney", null);return this;};
	/** not .... */
	this.lSmoneyNot=function(){if(this.proxy)return this.getProxy().lSmoneyNot();this.put("lSmoneyNot", "not");return this;};
	this.lSmoneyNotNull=function(){if(this.proxy)return this.getProxy().lSmoneyNotNull();this.put("lSmoneyNot", "not");this.put("lSmoney", null);return this;};
	this.lSmoneyNot=function(lSmoney){if(this.proxy)return this.getProxy().lSmoneyNot(lSmoney);this.put("lSmoneyNot", "not");this.put("lSmoney", lSmoney);return this;};
		
	/** and l_smoney <= ? */
	this.lSmoneyMin=function(min){if(this.proxy)return this.getProxy().lSmoneyMin(min);this.put("lSmoneyMin", min);return this;};
	/** and l_smoney >= ? */
	this.lSmoneyMax=function(max){if(this.proxy)return this.getProxy().lSmoneyMax(max);this.put("lSmoneyMax", max);return this;};
		
		 
	
	
	/** 修改时间 [非空]       **/
	this.updateTime=function(updateTime){if(this.proxy)return this.getProxy().updateTime(updateTime);  this.put("updateTime", updateTime);return this;};
	/** and update_time is null */
	this.updateTimeNull=function(){if(this.proxy)return this.getProxy().updateTimeNull();if(this.get("updateTimeNot")==null)this.put("updateTimeNot", "");this.put("updateTime", null);return this;};
	/** not .... */
	this.updateTimeNot=function(){if(this.proxy)return this.getProxy().updateTimeNot();this.put("updateTimeNot", "not");return this;};
	this.updateTimeNotNull=function(){if(this.proxy)return this.getProxy().updateTimeNotNull();this.put("updateTimeNot", "not");this.put("updateTime", null);return this;};
	this.updateTimeNot=function(updateTime){if(this.proxy)return this.getProxy().updateTimeNot(updateTime);this.put("updateTimeNot", "not");this.put("updateTime", updateTime);return this;};
		
	/** and update_time >= ? */
	this.updateTimeStart=function(start){if(this.proxy)return this.getProxy().updateTimeStart(start);this.put("updateTimeStart", start);return this;};			
	/** and update_time <= ? */
	this.updateTimeEnd=function(end){if(this.proxy)return this.getProxy().updateTimeEnd(end);this.put("updateTimeEnd", end);return this;};
		
		 
	
	
	/** 添加时间 [非空]       **/
	this.addTime=function(addTime){if(this.proxy)return this.getProxy().addTime(addTime);  this.put("addTime", addTime);return this;};
	/** and add_time is null */
	this.addTimeNull=function(){if(this.proxy)return this.getProxy().addTimeNull();if(this.get("addTimeNot")==null)this.put("addTimeNot", "");this.put("addTime", null);return this;};
	/** not .... */
	this.addTimeNot=function(){if(this.proxy)return this.getProxy().addTimeNot();this.put("addTimeNot", "not");return this;};
	this.addTimeNotNull=function(){if(this.proxy)return this.getProxy().addTimeNotNull();this.put("addTimeNot", "not");this.put("addTime", null);return this;};
	this.addTimeNot=function(addTime){if(this.proxy)return this.getProxy().addTimeNot(addTime);this.put("addTimeNot", "not");this.put("addTime", addTime);return this;};
		
	/** and add_time >= ? */
	this.addTimeStart=function(start){if(this.proxy)return this.getProxy().addTimeStart(start);this.put("addTimeStart", start);return this;};			
	/** and add_time <= ? */
	this.addTimeEnd=function(end){if(this.proxy)return this.getProxy().addTimeEnd(end);this.put("addTimeEnd", end);return this;};
		
		 
	
	
	/** 状态 [非空]   1:正常 0:无效     **/
	this.status=function(status){if(this.proxy)return this.getProxy().status(status);  this.put("status", status);return this;};
	/** and status is null */
	this.statusNull=function(){if(this.proxy)return this.getProxy().statusNull();if(this.get("statusNot")==null)this.put("statusNot", "");this.put("status", null);return this;};
	/** not .... */
	this.statusNot=function(){if(this.proxy)return this.getProxy().statusNot();this.put("statusNot", "not");return this;};
	this.statusNotNull=function(){if(this.proxy)return this.getProxy().statusNotNull();this.put("statusNot", "not");this.put("status", null);return this;};
	this.statusNot=function(status){if(this.proxy)return this.getProxy().statusNot(status);this.put("statusNot", "not");this.put("status", status);return this;};
		
		
	this.statusIn=function(ids){
		if(this.proxy)return this.getProxy().statusIn(ids);  this.put("statusIn", ids);return this;
	};	
		 
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有会员帐户 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/finance/account.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取会员帐户分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/finance/account.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取会员帐户 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/finance/account.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

Account.get = function(id){
	var protocol = ux.ajax("/admin/finance/account.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.account;
	return null;
}

Account.where = new Account.Where(0,true);